#ifndef TIMEOPERATION_H
#define TIMEOPERATION_H
#include <iostream>

#define CURRENT_TIME TimeOperation::instance().current_formatted_data()
class TimeOperation
{
private:
    explicit TimeOperation();

public:
    static TimeOperation &instance()
    {
        static TimeOperation instance; //单例模式，全局只有一个
        return instance;
    }
    TimeOperation(const TimeOperation &) = delete;
    TimeOperation &operator=(const TimeOperation &) = delete;

    std::string current_formatted_data();
    uint64_t timestamp();
};

#endif // TIMEOPERATION_H
